
var aArray = new Array( 5 );


for( var i = 0; i < aArray.length; i = i + 1 )
{
	aArray[ i ] = 0;
}

/*
aArray[ 0 ] = 0;	// argentina
aArray[ 1 ] = 0;	// bolivia
aArray[ 2 ] = 0;	// brazil
aArray[ 3 ] = 0;	// china
aArray[ 4 ] = 0;	// columbia
*/

function showImage( nIndex )
{
	aArray[ nIndex ] = aArray[ nIndex ] + 1;
}


function showArgentina()
{
	aArray[ 0 ] = aArray[ 0 ] + 1;
	document.getElementById( "picture" ).src = "images/argentina_1.jpg";
	document.getElementById( "picture2" ).src = "images/argentina_2.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Nahuel Haupi National Park.";	
	document.getElementById( "picture2" ).alt = "These are pictures of Argentina's flag'.";	
	document.getElementById( "picture" ).title = "Nahuel Haupi National Park";	
	document.getElementById( "picture2" ).title = "Argentina's flag";			

	document.getElementById( "caption" ).innerHTML = "Argentina is known for its <em> vast plains </em>, where cattle are grass-fed to create a flavor all of its own. Along with these plains are rain forests and mountains covered with snow.";		
}

function showBolivia()
{
	aArray[ 1 ] = aArray[ 1 ] + 1;
	document.getElementById( "picture" ).src = "images/bolivia_1.jpg";
	document.getElementById( "picture2" ).src = "images/bolivia_2.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of the Laguna Verde Volcano located near Acamarachi in Bolivia.";
	document.getElementById( "picture2" ).alt = "This is a picture of Bolivia's flag";	
	document.getElementById( "picture" ).title = "Laguna Verde Volcano";				
	document.getElementById( "picture2" ).title = "Bolivia's flag'";
	
	document.getElementById( "caption" ).innerHTML = "Bolivia known as <em>The rooftop of the world</em>. It is a country that is filled with mountainous terrains as well as jungles.";	
}

function showBrazil()
{
	aArray[ 2 ] = aArray[ 2 ] + 1;
	document.getElementById( "picture" ).src = "images/brazil_1.jpg";
	document.getElementById( "picture2" ).src = "images/brazil_2.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Cauchoeira-dos-Garcias, a waterfall in Brazil.";
	document.getElementById( "picture2" ).alt = "This is a picture of Brazil's flag";	
	document.getElementById( "picture" ).title = "Cauchoeira-dos-Garcias waterfall";	
	document.getElementById( "picture2" ).title = "Brazil's flag'";
	
	document.getElementById( "caption" ).innerHTML ="Brazil houses more than <b> half of the entire population of South America!</b> Only one percent of the people that reside there are native to the country.";
}

function showChile()
{
	aArray[ 3 ] = aArray[ 3 ] + 1;
	document.getElementById( "picture" ).src = "images/chile_1.jpg";
	document.getElementById( "picture2" ).src = "images/chile_2.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Santiago with one of their majestic mountains behind it.";
	document.getElementById( "picture2" ).alt = "This is a picture of Chile's flag";	
	document.getElementById( "picture" ).title = "Santiago Chile's capital city";				
	document.getElementById( "picture2" ).title = "Chile's flag'";
	
	document.getElementById( "caption" ).innerHTML ="Chile is refered to as <em>the country at the end of the world</em>. It is known for its oceans, andes-like peaks and glorious rivers.";
}

function showColumbia()
{
	aArray[ 4 ] = aArray[ 4 ] + 1;
	document.getElementById( "picture" ).src = "images/columbia_1.jpg";
	document.getElementById( "picture2" ).src = "images/columbia_2.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of an overhead view of some mountains in Kouteny National Park";
	document.getElementById( "picture2" ).alt = "This is a picture of Columbia's flag";	
	document.getElementById( "picture" ).title = "Kouteny National Park";				
	document.getElementById( "picture2" ).title = "Columbia's flag'";
	
	document.getElementById( "caption" ).innerHTML ="Columbia is the only country in South America which has beaches in both the <b>Pacific ocean and Carribean Sea!</b> The Country is separated by mountains, keeping its eastern jungles sepearate from the low lying western territory.";
}

function showCounter()
{
		
	if( aArray[ 0 ] > 0 && aArray[ 1 ] > 0 && aArray[ 2 ] > 0 
			&& aArray[ 3 ] > 0 && aArray[ 4 ] > 0 )
	{
		alert( "CONGRATULATIONS! " + aArray);
		window.location = "Countries.html";
	}
	else
	{
		alert( "YOU DIDN'T FINISH THE COURSE!" );
	}
}




